import request from '@/utils/request'

export function getUserChannels () {
  return request({
    method: 'get',
    url: 'user/channels'
  })
}
// 获取所有频道
export function getAllchannels () {
  return request({
    method: 'get',
    url: 'channels'
  })
}

// 添加频道
export function addChannels (data) {
  return request({
    method: 'PATCH',
    url: 'user/channels',
    data
  })
}
// 删除用户频道列表
export function removeUserChannels (id) {
  return request({
    method: 'delete',
    url: `user/channels/${id}`
  })
}
